Repository navigation
ci(workflows): v1.2.0 — coolify-deploy runs in the caller's environment; setup can skip the pnpm cache [FACT-1910] - #4
Conversation
…nt; setup can skip the pnpm cache [FACT-1910] An Infisical OIDC identity that trusts `...:environment:<name>` only matches a token requested by a job running in that environment, and a caller job that `uses:` this workflow cannot set `environment:`. coolify-deploy.yml takes `environment` (empty = none) and `deployment` (default true; false for a caller that writes its own Deployment records) and runs its deploy job there. The setup action takes `cache` (default true) so a caller whose runners keep the pnpm store can skip the save and restore. The Infisical action is pinned by commit; the script fallback refs move to v1.2.0. A test pins all three. Refs: FACT-1910 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f6dd8d9 to
e823632
Compare
practical-bot
left a comment
There was a problem hiding this comment.
Review
I reviewed the current card, which is newer than any prior review context: it still requires the factory and frontdesk deploy callers, every factory deploy workflow's workflow_dispatch path, and the live verification steps. This PR correctly implements the shared-workflow portion: environment.name and deployment are valid job-environment settings, the setup action's cache switch is explicit and defaults on, the Infisical action is commit-pinned, and both fallback refs are advanced to v1.2.0. The 27-test ledger claim passes on this head, and the intentional mutation also fails as claimed.
Claim ledger
- “
node --test scripts/*.test.mjs: 27 pass, 0 fail.” PASS —node --test scripts/*.test.mjs→27tests,27pass,0fail. - “I checked that the new test can fail: rewriting the deploy job's
environment:made it fail 1 of 4.” PASS — mutation command changedname: ${{ inputs.environment }}toname: broken; the test run reported1..4,pass 3,fail 1. - “An empty environment ... showed ... no environment” and “with
environment: fact-1910-probe...sub=...:environment:fact-1910-probe.” UNVERIFIED — the cited run44105951043is on old commitd912a381, and its job summary is available, but the claim depends on the deleted probe's log/claims rather than this head's changed files. - “
GET /repos/PracticalWorks/.github/deploymentsreturned 0 afterwards.” PASS —gh api repos/PracticalWorks/.github/deployments --jq 'length'→0. - “YAML parses.
actionlintreports only ... warnings.” UNVERIFIED —actionlintis not installed in this review workspace; the attempted command could not run. This is an environment limitation, not a PR finding. - “The README documents the new inputs and why
environmentexists.” PASS — README includesenvironment,deployment, examples, and the environment/OIDC explanation.
Findings
-
The PR does not meet the current FACT-1910 card's caller-workflow scope. The card requires “practical-works-factory's deploy workflows and frontdesk's Coolify deploy call it” and requires every factory deploy workflow to accept
workflow_dispatchand be proven withgh workflow run. This diff is only inPracticalWorks/.github(the five changed files are.github/actions/setup/action.yml,.github/workflows/coolify-deploy.yml,.github/workflows/pr-guard.yml,README.md, andscripts/workflows.test.mjs), so it cannot satisfy those criteria or the card's Done-when for both repositories. Either include the caller changes in this outcome/PR or have the PM re-scope FACT-1910 and file/release the caller work as a separately linked outcome before approval. This is judged against the newer card scope, not inferred from the PR title. -
The PR body says “After merge,
v1.2.0is tagged on the merge commit,” but the tag is required for the caller workflows' one-line pin bump and is not produced by this diff. If that tag creation is a required precondition for the caller changes in this same outcome, add it under## Before mergeas an unchecked checklist item with the exact tag/ref operation; otherwise document the caller/tag work as the separate follow-up outcome. (No## Before mergesection currently exists.)
Verification owed after merge
NEEDS VERIFICATION: v1.2.0 is tagged on the merge commit and the latest practical-works-factory and PracticalWorks/frontdesk deploy runs source coolify-deploy.yml from PracticalWorks/.github at that tag and are green.
NEEDS VERIFICATION: gh workflow run is accepted and completes for auto-agent, brain-door, bridge, and plane-bridge, and the hand-run restarts the service with the newly added Infisical value, without launchctl or SSH.
NEEDS VERIFICATION: the org's monthly Actions usage lists practical-works-factory and frontdesk separately.
REVIEW VERDICT: changes-requested
REVIEWED DIFF: base=main files=5 lines=116
FINDING: The current FACT-1910 card requires factory/frontdesk caller changes and workflow_dispatch verification, but this PR changes only PracticalWorks/.github; re-scope the card or include/release the missing caller outcome -> changes-requested
FINDING: The body describes tagging v1.2.0 after merge but does not identify how the caller pin bump is released; add the exact pre-merge checklist if this is a prerequisite, or split/re-scope the outcome -> changes-requested
UNVERIFIED: actionlint claim could not run because actionlint is not installed in this review workspace; CI did not run actionlint.
|
Supplemental review evidence for FACT-1910: the native Talos review on head |
practical-bot
left a comment
There was a problem hiding this comment.
Review
The PR body now addresses the prior body-only findings. It links factory#1266 and frontdesk#565 as the caller PRs, puts the exact gh api ... refs/tags/v1.2.0 ... command under an unchecked ## After merge item, and explicitly records the FACT-1052 workflow_dispatch criterion as outside these three PRs and flagged for a scope decision. I therefore reviewed this head against the clarified three-PR release shape rather than treating the caller work as missing from this shared-workflow PR.
Claim ledger
- “
node --test scripts/*.test.mjs: 27 pass, 0 fail.” PASS —node --test scripts/*.test.mjs→ 27 tests, 27 pass, 0 fail. - “rewriting the deploy job's
environment:made it fail 1 of 4.” PASS — replacingname: ${{ inputs.environment }}withname: brokenproduced 1 failing and 3 passing tests. - “with
environmentempty ... no environment” and “withenvironment: fact-1910-probe...sub=...:environment:fact-1910-probe.” UNVERIFIED — the cited probe run is on the earlierd912a381head and the probe was deleted; this is historical evidence not reproducible from the current diff, not a current-head defect. - “
GET /repos/PracticalWorks/.github/deploymentsreturned 0 afterwards.” PASS —gh api repos/PracticalWorks/.github/deployments --jq 'length'→0. - “YAML parses.
actionlintreports only ... warnings.” UNVERIFIED —actionlintis not installed in this review workspace. The current PR checks ranguard-testsandguard / checksuccessfully on this exact head, but not actionlint. - “The README documents the new inputs and why
environmentexists.” PASS — README contains theenvironment,deployment, andcachedocumentation, examples, and the OIDC subject explanation.
The implementation matches the clarified release shape: the shared workflow runs its deploy job in the requested caller environment, makes deployment-record creation explicit, the setup action's cache is opt-out while preserving the existing default, the Infisical action is commit-pinned, and both fallback refs advance to v1.2.0. The workflow tests cover these contracts and pass; the intentional environment mutation proves the new guard is effective.
The PR checks on this exact head e82363220d431dadf866d8a6d2d32b9b6db3fc35 are green (guard-tests, guard / check), and their steps show the test script and PR-body/guardrail checks actually ran.
Verification owed after merge
NEEDS VERIFICATION: the merge commit is tagged v1.2.0, and the latest practical-works-factory and PracticalWorks/frontdesk deploy runs source coolify-deploy.yml from PracticalWorks/.github at that tag and are green.
NEEDS VERIFICATION: gh workflow run is accepted and completes for auto-agent, brain-door, bridge, and plane-bridge, and the hand-run restarts the service with the newly added Infisical value without launchctl or SSH.
NEEDS VERIFICATION: the org's monthly Actions usage lists practical-works-factory and frontdesk separately.
REVIEW VERDICT: approve
REVIEWED DIFF: base=main files=5 lines=116
Release v1.2.0 of the shared workflows, for FACT-1910 (factory and frontdesk deploy through
coolify-deploy.ymlwith Infisical OIDC). The outcome spans three repositories, so it is three PRs. A PR here cannot change the callers, and the callers cannot pin a tag that does not exist yet:v1.2.0)coolify-deploy.yml@v1.2.0over OIDC. It leaves no Coolify repository secret referenced and no private copy of the webhook or the wait. The factory's live proof stays around the shared job.frontdesk-prod, its env sync logs in over OIDC, andcache: "false"is set on its setup calls.Each caller pins
@v1.2.0in one line per call. A later release reaches both with the same one-line bump. Both callers carry a## Before mergeitem for the tag below.What changes
coolify-deploy.ymltakesenvironmentanddeployment. The factory and frontdesk Infisical identities trust a subject that ends in:environment:<name>. A token carries that segment only when the job that requests it runs in the environment, and a caller job thatuses:a workflow cannot setenvironment:. So the deploy job now setsenvironment: { name: inputs.environment, deployment: inputs.deployment }. An empty name means no environment, which is today's behaviour.deployment: falsestops GitHub writing its own Deployment record for the job. The factory needs that because it writes its own records inauto-agent/brain-doorand reads the newest successful one as "what is live".cache(defaulttrue). Withfalse,actions/setup-nodegets nocache: pnpm. Frontdesk turned the cache off on purpose in FACT-1931 (about 40 s per run, and its runner pool keeps the store).d2e351f…= v1.0.18). Thejob.workflow_shafallbacks incoolify-deploy.ymlandpr-guard.ymlmove tov1.2.0, as the README says each release must. The README documents the new inputs and whyenvironmentexists.scripts/workflows.test.mjspins the new inputs and the commit pin. It also checks that every fallback ref equals the newest tag in the README.Verification
node --test scripts/*.test.mjs: 27 pass, 0 fail. I checked that the new test can fail: rewriting the deploy job'senvironment:made it fail 1 of 4.subclaim, tested on GitHub. An earlier head of this PR (d912a38, f6dd8d9, since squashed away) had a temporary probe workflow with exactly thisenvironment: { name, deployment }block. Run 44105951043 and the run after it showed:environmentempty, the job ran with no environment:sub=repo:PracticalWorks@259778040/.github@1318607589:pull_requestenvironment: fact-1910-probeanddeployment: false, the job ran andsub=repo:PracticalWorks@259778040/.github@1318607589:environment:fact-1910-probe. The caller repo plus the environment is the shape the factory and frontdesk identities bind.GET /repos/PracticalWorks/.github/deploymentsreturned 0 afterwards, sodeployment: falsewrote no Deployment record. I then deleted the probe environment.actionlintreports only the existingjob.workflow_sha/job.workflow_repositoryunknown-property warnings, which come from its older schema.After merge
gh api repos/PracticalWorks/.github/git/refs -f ref=refs/tags/v1.2.0 -f sha=$(gh pr view 4 -R PracticalWorks/.github --json mergeCommit --jq .mergeCommit.oid).v1andv1.1.0are not moved. The two caller PRs above list this tag as their## Before mergeprecondition.Not in this outcome
The card's FACT-1052 criterion was folded in on 2026-11-16:
workflow_dispatchon every factory deploy workflow, proven withgh workflow run. It lives entirely in the factory's own workflows, not in this repository. It is not part of these three PRs, and I flagged it on the card for a decision: a follow-up PR, or split back out.Refs: FACT-1910
🤖 Generated with Claude Code